﻿namespace NazTek.Core
{
    /// <summary>
    /// Provides web service context information.
    /// </summary>
    public interface IServiceContext
    {
        /// <summary>
        /// Gets/sets the portion of the URI related to specific action, excluding the base URI.
        /// </summary>
        string ActionUri { get; set; }
        /// <summary>
        /// Gets/sets the base web service URI
        /// </summary>
        string BaseUri { get; set; }
        /// <summary>
        /// Gets/sets media type, e.g., application/json.
        /// </summary>
        string DataTransferMedia { get; set; }
    }
    /// <summary>
    /// Default <see cref="IServiceContext"/> implementation.  Provides default property accessors and must be set by consumer at a higher level.
    /// </summary>
    public class ServiceContext : IServiceContext
    {
        /// <summary>
        /// Gets/sets the portion of the URI related to specific action, excluding the base URI.
        /// </summary>
        public string BaseUri { get; set; }
        /// <summary>
        /// Gets/sets the base web service URI
        /// </summary>
        public string ActionUri { get; set; }
        /// <summary>
        /// Gets/sets media type, e.g., application/json.
        /// </summary>
        public string DataTransferMedia { get; set; }
    }
}